package cs4383;

import java.awt.Color;
import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;

public class ImageRenderer extends DefaultListCellRenderer {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public Component getListCellRendererComponent(JList list, Object value,
			int index, boolean isSelected, boolean cellHasFocus) {
		Component component = (Component) value;
		component.setBackground(isSelected ? Color.black : Color.white);
		component.setForeground(isSelected ? Color.white : Color.black);
		return component;
	}

}
